Skip to content

DFBUGS-6865: Fix PVC leftover issue for non-discovered apps#769

Open
raaizik wants to merge 1 commit into
red-hat-storage:release-4.21from
raaizik:dfbugs-6865-fix-pvc-leftover-non-discovered
Open

DFBUGS-6865: Fix PVC leftover issue for non-discovered apps#769
raaizik wants to merge 1 commit into
red-hat-storage:release-4.21from
raaizik:dfbugs-6865-fix-pvc-leftover-non-discovered

Conversation

@raaizik
Copy link
Copy Markdown

@raaizik raaizik commented May 13, 2026

During VRG deletion, DisownVolSyncManagedPVC was removing all ownerReferences from PVCs instead of just the VRG owner. This conflicted with the skipPVCDisownership=true flag used during cleanup, breaking Kubernetes garbage collection for non-discovered apps that have the do-not-delete-pvc annotation.

The PVC should have two owners: VRG and VolSync resource (RS/RD). PR RamenDR#2242 correctly preserves RS/RD ownership during cleanup via skipPVCDisownership=true. However, DisownVolSyncManagedPVC() was removing all owners when the annotation is present, undermining this protection.

This fix makes DisownVolSyncManagedPVC() remove only the VRG ownerReference, aligning with skipPVCDisownership=true and allowing Kubernetes garbage collection to properly clean up PVCs when VolSync resources are deleted.

This resolves PVC leftover issues in three scenarios:

  • Failover followed by application deletion
  • Relocate followed by application deletion
  • Direct application deletion after DR enablement

Fixes: DFBUGS-6865
Related: DFBUGS-6325, PR RamenDR#2504, PR RamenDR#2242

(cherry picked from commit 901f68a)

@openshift-ci-robot openshift-ci-robot added jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-reference labels May 13, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 13, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: raaizik

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented May 13, 2026

@raaizik: This pull request references [Jira Issue DFBUGS-6865](https://redhat.atlassian.net/browse/DFBUGS-6865), which is invalid:

  • expected the bug to target the "odf-4.21.3" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

During VRG deletion, DisownVolSyncManagedPVC was removing all ownerReferences from PVCs instead of just the VRG owner. This conflicted with the skipPVCDisownership=true flag used during cleanup, breaking Kubernetes garbage collection for non-discovered apps that have the do-not-delete-pvc annotation.

The PVC should have two owners: VRG and VolSync resource (RS/RD). PR RamenDR#2242 correctly preserves RS/RD ownership during cleanup via skipPVCDisownership=true. However, DisownVolSyncManagedPVC() was removing all owners when the annotation is present, undermining this protection.

This fix makes DisownVolSyncManagedPVC() remove only the VRG ownerReference, aligning with skipPVCDisownership=true and allowing Kubernetes garbage collection to properly clean up PVCs when VolSync resources are deleted.

This resolves PVC leftover issues in three scenarios:

  • Failover followed by application deletion
  • Relocate followed by application deletion
  • Direct application deletion after DR enablement

Fixes: DFBUGS-6865
Related: DFBUGS-6325, PR RamenDR#2504, PR RamenDR#2242

(cherry picked from commit 901f68a)

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@raaizik raaizik force-pushed the dfbugs-6865-fix-pvc-leftover-non-discovered branch from 325f827 to 4608561 Compare May 13, 2026 09:34
During VRG deletion, DisownVolSyncManagedPVC was removing all
ownerReferences from PVCs instead of just the VRG owner. This
conflicted with the skipPVCDisownership=true flag used during
cleanup, breaking Kubernetes garbage collection for non-discovered
apps that have the do-not-delete-pvc annotation.

The PVC should have two owners: VRG and VolSync resource (RS/RD).
PR RamenDR#2242 correctly preserves RS/RD ownership during cleanup via
skipPVCDisownership=true. However, DisownVolSyncManagedPVC() was
removing all owners when the annotation is present, undermining
this protection.

This fix makes DisownVolSyncManagedPVC() remove only the VRG
ownerReference, aligning with skipPVCDisownership=true and allowing
Kubernetes garbage collection to properly clean up PVCs when
VolSync resources are deleted.

This resolves PVC leftover issues in three scenarios:
- Failover followed by application deletion
- Relocate followed by application deletion
- Direct application deletion after DR enablement

Fixes: DFBUGS-6865
Related: DFBUGS-6325, PR RamenDR#2504, PR RamenDR#2242

Signed-off-by: raaizik <132667934+raaizik@users.noreply.github.com>
(cherry picked from commit 901f68a)
@raaizik raaizik force-pushed the dfbugs-6865-fix-pvc-leftover-non-discovered branch from 4608561 to 58dc73a Compare May 13, 2026 09:40
@raaizik
Copy link
Copy Markdown
Author

raaizik commented May 13, 2026

/jira refresh

@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented May 13, 2026

@raaizik: This pull request references [Jira Issue DFBUGS-6865](https://redhat.atlassian.net/browse/DFBUGS-6865), which is invalid:

  • expected the bug to target the "odf-4.21.3" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@raaizik
Copy link
Copy Markdown
Author

raaizik commented May 13, 2026

@raghavendra-talur I re-ran the failing jobs without success. It's a 4.21 branch issue.

@raaizik
Copy link
Copy Markdown
Author

raaizik commented May 14, 2026

/jira refresh

@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented May 14, 2026

@raaizik: This pull request references [Jira Issue DFBUGS-6865](https://redhat.atlassian.net/browse/DFBUGS-6865), which is invalid:

  • expected the bug to target the "odf-4.21.5" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@raaizik
Copy link
Copy Markdown
Author

raaizik commented May 14, 2026

/jira refresh

@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented May 14, 2026

@raaizik: This pull request references [Jira Issue DFBUGS-6865](https://redhat.atlassian.net/browse/DFBUGS-6865), which is invalid:

  • expected the bug to target the "odf-4.21.5" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@raaizik
Copy link
Copy Markdown
Author

raaizik commented May 14, 2026

/jira refresh

@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented May 14, 2026

@raaizik: This pull request references [Jira Issue DFBUGS-6865](https://redhat.atlassian.net/browse/DFBUGS-6865), which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (odf-4.21.5) matches configured target version for branch (odf-4.21.5)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-bug jira/valid-reference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants